﻿using System;
using System.Windows.Data;
using System.Windows.Media;

namespace HolterDatabase
{
    public class InternalToColorConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (!(value is System.DBNull) && (bool)(value))
            {
                return Brushes.Transparent;
            }
            else
            {
                return new SolidColorBrush(Color.FromRgb(190, 240, 150));
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
